package com.mmo.cq.game.server.bean.user;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.wxd.batis.struct.DbColumn;
import org.wxd.io.ObjectFactory;

/**
 * 用户快照
 *
 * @author: Troy.Chen(無心道, 15388152619)
 * @version: 2023-02-02 20:19
 **/
@Getter
@Setter
@Accessors(chain = true)
public class UserSnap extends UserBase {

    @DbColumn(index = true, comment = "账号")
    private String account;
    @DbColumn(comment = "账号")
    private String channel;
    /*角色名字*/
    private String name;
    private int sex;
    private int job;
    private short lv;
    private long exp;
    private short vipLv;
    private long vipExp;

    public String logName() {
        return ObjectFactory.stringBuilder(sb -> {
            sb.append("{");
            sb.append("uid='").append(getUid()).append('\'');
            sb.append(", name='").append(name).append('\'');
            sb.append(", lv=").append(lv);
            sb.append('}');
        });
    }
}
